package org.jeecg.modules.quartz.job;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.util.DateUtils;
import org.jeecg.config.mybatis.TenantContext;
import org.jeecg.modules.pay.service.IBillReceiveService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.Resource;

/**
 * 第三方-农行对账单自动下载前一天的
 * 07：10
 */

@Slf4j
public class FeeAutoAbcPayBillJob implements Job {

	@Resource(name = "billReceiveAbcService")
	private IBillReceiveService billReceiveAbcService;
	@Autowired
	private ISysBaseAPI baseAPI;

	@Override
	public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

		log.info(String.format(" Boot 农行对账单自动下载 FeeAutoAbcPayBillJob !  开始时间:" + DateUtils.getTimestamp()));

		TenantContext.setTenant("16");
		billReceiveAbcService.abcBillFileDown();

		log.info(String.format(" Boot 农行对账单自动下载 FeeAutoAbcPayBillJob !  结束时间:" + DateUtils.getTimestamp()));
	}

}
